# define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int drink = 0, empty = 0, count = 0;
	scanf("%d", &drink);
	empty = drink;
	do
	{
		int charge = empty / 2;
		drink = drink + charge;
		empty = charge + empty % 2;
	} while (empty >= 2);
	printf("%d\n", drink);
	return 0;
}
